package com.chargerlink.echarger.until;

import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;

import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;

/**
 * Created by fansxnet on 17-5-9.
 */
public  class IOUtil {
    private static Logger logger = Logger.getLogger(IOUtil.class);
    public static String loadData2String(String fileUrl){
        try {
            return FileUtils.readFileToString(new File(fileUrl), Charset.forName("UTF-8"));
        } catch (IOException e) {
            logger.error(e);
            return null;

        }
    }
}
